<?php

namespace common\models;

use Yii;

/**
 * This is the model class for table "life_time".
 *
 * @property int $id
 * @property int $life_action 生活类型，0：未知，1：喂奶，2：便便，3：睡觉，4：喂奶+ad,5:喂奶+d3
 * @property int $action_time 操作时间
 * @property string $created_at
 * @property string $updated_at
 */
class LifeTime extends \yii\db\ActiveRecord
{

    const ACTION_UNKNOW = 0;
    const ACTION_EAT = 1;
    const ACTION_WC = 2;
    const ACTION_SLEEP = 3;
    const ACTION_EAT_AD = 4;
    const ACTION_EAT_D3 = 5;

    public static $action = [
        self::ACTION_UNKNOW=>self::ACTION_UNKNOW,
        self::ACTION_EAT=>self::ACTION_EAT,
        self::ACTION_WC=>self::ACTION_WC,
        self::ACTION_SLEEP=>self::ACTION_SLEEP,
        self::ACTION_EAT_AD=>self::ACTION_EAT_AD,
        self::ACTION_EAT_D3=>self::ACTION_EAT_D3
    ];

    /**
     * {@inheritdoc}
     */
    public static function tableName()
    {
        return 'life_time';
    }

    /**
     * {@inheritdoc}
     */
    public function rules()
    {
        return [
            [['life_action', 'action_time'], 'integer'],
            [['created_at', 'updated_at'], 'safe'],
        ];
    }

    /**
     * {@inheritdoc}
     */
    public function attributeLabels()
    {
        return [
            'id' => 'ID',
            'life_action' => '生活类型，0：未知，1：喂奶，2：便便，3：睡觉，4：喂奶+ad,5:喂奶+d3',
            'action_time' => '操作时间',
            'created_at' => 'Created At',
            'updated_at' => 'Updated At',
        ];
    }
}
